﻿<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>微街秀 > 我的设置</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link href="css/MakeSeting.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div>
        <div class="wamtop">
            <div class="topleft" onclick="window.location.href='Makeft.html'">
                <img src="img/5.jpg" />
            </div>
            <div class="topcententxt">
                我的设置
            </div>
            <div class="topright state">
            </div>
        </div>
        <div class="title" onclick="window.location.href='Makeaddwx.html?rand=5219'">
            <img src="img/logo.png" style="width: 50px; float: left; margin: 10px 0 0 20px;">
            <div style="float: left; margin: 20px 0 0 10px; line-height: 17px;">
                <span style="color: #414141;">请加此微信为好友</span><br>
                <span style="font-size: 12px; color: #8F8F8F;">微街秀</span>
            </div>
            <img src="img/45.png" class="rgihtico" style="margin-top: 25px;">
            <img src="img/Makeimg/21.png" style="width: 20px; float: right; margin: 25px 10px 0 0;">
        </div>
        <div style="height: 50px; margin-top: 5px; background: white; border-bottom: 1px #D6D5D3 solid;"
            onclick="toUrl(this); return false()">
            <span class="lefttxt">姓名</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt truename"></span>
        </div>
        <div style="height: 50px; background: white; border-bottom: 1px #D6D5D3 solid;" onclick="toUrl(this); return false()">
            <span class="lefttxt">微信号</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt wx_name"></span>
        </div>
        <!--<div style="height: 50px; width: 100%; background: white; border-bottom: 1px #D6D5D3 solid;"
            onclick="toUrl(this); return false()">
            <span class="lefttxt">手机号码</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt mobile">手机号码</span>
        </div>-->
        <div style="height: 50px; width: 100%; background: white; margin-top: 5px; border-bottom: 1px #D6D5D3 solid;"
            onclick="toUrl(this); return false()">
            <span class="lefttxt">微信好友数量</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt wx_number"></span>
        </div>
        <div style="height: 50px; width: 100%; background: white; border-bottom: 1px #D6D5D3 solid;"
            onclick="window.location.href='MakeUplodimg.html'">
            <span class="lefttxt">好友数量截图</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt wx_picurl"></span>
        </div>
        <div style="height: 50px; width: 100%; background: white; margin-top: 5px;" onclick="window.location.href='MakeSelectare.html'">
            <span class="lefttxt">区域</span>
            <img src="img/45.png" class="rgihtico">
            <span class="righttxt area"></span>
        </div>
    </div>
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/ajax-data.js" type="text/javascript"></script>
    <script src="js/base.js?123" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script>
        var page = 1;
        $(function () {
            load(page);
            updateLocation();
        });
        function load(page) {
            if (!islogin()) { window.location.href = 'login.html'; return; }
            AjaxStart("ajax/fc_setting.ashx?get", "", function (data) {
                loadhtml(data.item);
            });
        }

        function toUrl(obj) {
            if (!islogin()) { window.location.href = 'login.html'; return; }
            window.location.href = 'Makesetdetail.html?name=' + $(obj).children('.righttxt').html() + '&nick=' + $(obj).children().html();
        }
        function loadhtml(item) {
            $(".truename").html(item["truename"]);
            //$(".mobile").html(item["mobile"]);
            $(".wx_name").html(item["wx_name"]);
            $(".wx_number").html(item["wx_number"]);
            if (item["state"] == 1)
                $(".state").html("已审核");
            else
                $(".state").html("未审核");
            if (item.wx_picurl != null && item.wx_picurl != "")
                $(".wx_picurl").html("已上传");
            else
                $(".wx_picurl").html("未上传");
            var area = "";
            if (item.area1 != null)
                area += item.area1;
            if (item.area2 != null)
                area += "-" + item.area2;
            if (item.area3 != null)
                area += "-" + item.area3;
            $(".area").html(area);
        }

        //每次打开此页面是跟新缓存猜的定位
        function updateLocation() {
            if (navigator.userAgent.indexOf("wjx") == -1) {
                return;
            }
            var param = { callback: "Call_Location", isRefresh: false };
            var p = JSON.stringify(param);
            window.location.href = "callback://location?" + p;
        }

        function Call_Location(jsonStr) {
            var json = jsonStr;
            if (json != null) {
                json = JSON.parse(json);

                setStorage("area1", json.province);
                setStorage("area2", json.city);
                setStorage("area3", json.district);
            }
            else
                Alert("获取定位失败");
        }
    </script>
</body>
</html>
